SHA-8: W5 内测批次、F0~F6 聚合与活动事件治理 - #46
Draft
WardLu wants to merge 2 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WardLu
force-pushed
the
feat/growth-loop-integration
branch
from
August 17, 2026 15:02
918b99a to
90012c7
Compare
WardLu
force-pushed
the
feat/growth-loop-w5-funnel-metrics
branch
from
August 18, 2026 10:02
56aa9ec to
8771166
Compare
- private.learning_beta_batches:内测批次(F0 分母),仅存家庭 ID/批次/时间/状态, 客户端无访问权,家庭删除级联清理 - private.learning_growth_days 视图 + learning_funnel_status/report/wmgh_weekly 函数:严格按计划 8.1 + 附件 06 定义 F0~F6 与 WMGH(有效成长日去重、补记排除、 72h 快速激活、7 天观察窗、自然周冻结) - private.learning_purge_activity_events + pg_cron 每日任务:activity_events 滚动 180 天保留自动清理,仅私有内部访问 - 配套 pgTAP 测试:批次表 9 项、漏斗/WMGH 43 项、清理边界 10 项(共 62 项全过, 全量 221 项无回归)
WardLu
force-pushed
the
feat/growth-loop-w5-funnel-metrics
branch
from
August 19, 2026 19:30
8771166 to
77ba894
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
SHA-8(W5)返工:在最新
main(eb244cf)上重放 Draft PR #46,修复迁移版本冲突、延迟/内测前行为口径、隐私披露与 activity event 服务端边界。本 PR 保持 Draft。仓库仍为 shared Supabase 的 proposal-only 范围;未执行共享生产迁移、未合并、未发布。
迁移与指标口径
20260820120000_growth_loop_beta_batches.sql20260820121000_growth_loop_funnel_aggregation.sql20260820122000_growth_loop_activity_cleanup.sqlcreated_at;event 校验精确occurred_at >= cohort_start。received_at - occurred_at必须在 0~7 天;超过 7 天不进入有效成长日。created_at/ eventreceived_at),延迟上报不能按旧发生日倒推激活。SECURITY DEFINER函数固定空search_path,查询显式限定project_id = 'shadow-mate'。隐私、导出与服务端边界
privacy-v2,同步更新PRIVACY.md、privacy-policy.html中英文内容和发布迁移说明。privacy-v2;已有privacy-v1保留原版本/时间戳并继续有效,不自动改写或强制重复确认。received_at保留 180 天;家庭/学习者删除通过外键级联覆盖,内测批次随家庭删除。private.learning_activity_events、private.learning_beta_batches、Auth/邮箱、会话/设备或 Vercel Analytics 数据。received_at清理索引;无 pg_cron 时迁移安全跳过调度,清理函数仍保留给受信运维。验证
supabase db reset,验证后已删除临时实例。SHADOW_MATE_TEST_DB_URL=<loopback> npm run test:db:12 个 pgTAP 文件、304 项全部通过。覆盖 >7 天延迟、ledger/event cohort 前行为、家庭时区日界线、F2/72h、F5/F6、WMGH 冻结、RLS/普通用户不可读、家庭级联删除、180 天清理边界、无 pg_cron 和 payload 非法/超长值。privateschema 无错误/警告;public,private联合 lint 仅有本 PR 未触及的既有public.learning_cancel_redemption未读变量警告。npm run test:unit:21 个文件、153 项通过。cloud.spec.js29 项、growth-loop.spec.js4 项通过;覆盖新同意写入privacy-v2、导出/删除和 local-first Growth Loop 路径。delete-account隔离保护通过,确认共享 Auth 身份和家庭不会被错误删除。npm run verify通过(public/security/static/privacy consistency checks、Vite production build、构建产物检查、153 项 coverage test)。origin/main..HEAD两次检查均通过。关联:SHA-8(Multica issue
51c9a0b5-5e1d-4ac5-b81d-ca6af51fc3bb)